//package com.net.wanjian.networkhospitalmanager.adapter;
//
//
//import android.content.Context;
//import android.support.v7.widget.RecyclerView;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//import com.bumptech.glide.Glide;
//import com.net.wanjian.networkhospitalmanager.R;
//import com.net.wanjian.networkhospitalmanager.bean.Video.GetVideoListBean;
//import com.net.wanjian.networkhospitalmanager.utils.DateUtil;
//
//import java.util.ArrayList;
//
//
///**
// * Created by Xia_焱 on 2017/8/12.
// */
//
//public class VoidListAdapter extends RecyclerView.Adapter<VoidListAdapter.ViewHolderX> implements View.OnClickListener {
//
//
//    private ArrayList<GetVideoListBean.VideoListBean.VideoBean> mVideoList;
//    private Context mContext;
//
//    @Override
//    public void onClick(View view) {
//
//    }
//
//
//    public interface OnItemClickLitener {
//        void onItemClick(View view, int position);
//    }
//
//    private OnItemClickLitener mOnItemClickLitener;
//
//    public void setOnItemClickLitener(OnItemClickLitener mOnItemClickLitener) {
//        this.mOnItemClickLitener = mOnItemClickLitener;
//    }
//
//    public VoidListAdapter(Context context, ArrayList<GetVideoListBean.VideoListBean.VideoBean> videoList) {
//        this.mContext = context;
//        this.mVideoList = videoList;
//    }
//
//    @Override
//    public VoidListAdapter.ViewHolderX onCreateViewHolder(ViewGroup parent, int viewType) {
//        View view = LayoutInflater.from(mContext).inflate(R.layout.item_void_list, parent, false);
//        ViewHolderX holder = new ViewHolderX(view);
//        view.setOnClickListener(this);
//        return holder;
//    }
//
//    @Override
//    public void onBindViewHolder(final VoidListAdapter.ViewHolderX holder, int position) {
//        Glide.with(mContext).load(mVideoList.get(position).getCoverURL()).placeholder(R.mipmap.ic_loading_325).into(holder.img_picture);
//        holder.tv_ms.setText(mVideoList.get(position).getDescription());
//        holder.tv_Duration.setText(DateUtil.secToTime((int) mVideoList.get(position).getDuration()));
//        String createTime = mVideoList.get(position).getCreateTime();
//        holder.tv_time.setText(DateUtil.dateFormat(createTime));
//        holder.tv_title.setText(mVideoList.get(position).getTitle());
//        holder.tv_classification.setText(mVideoList.get(position).getCateName());
//        // 如果设置了回调，则设置点击事件
//        if (mOnItemClickLitener != null) {
//            holder.itemView.setOnClickListener(new View.OnClickListener() {
//                @Override
//                public void onClick(View v) {
//                    int pos = holder.getLayoutPosition();
//                    mOnItemClickLitener.onItemClick(holder.itemView, pos);
//                }
//            });
//        }
//    }
//
//    @Override
//    public int getItemCount() {
//        return mVideoList.size();
//    }
//
//    class ViewHolderX extends RecyclerView.ViewHolder {
//        private ImageView img_picture;
//        private TextView tv_ms;
//        private TextView tv_time, tv_title, tv_classification,tv_Duration;
//
//        public ViewHolderX(View itemView) {
//            super(itemView);
//            img_picture = (ImageView) itemView.findViewById(R.id.img_picture);
//            tv_ms = (TextView) itemView.findViewById(R.id.tv_ms);
//            tv_time = (TextView) itemView.findViewById(R.id.tv_time);
//            tv_title = (TextView) itemView.findViewById(R.id.tv_title);
//            tv_classification = (TextView) itemView.findViewById(R.id.tv_classification);
//             tv_Duration = (TextView)itemView.findViewById(R.id.tv_Duration);
//        }
//    }
//}